package com.nl.lib_project.provider.bus

import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.asSharedFlow

/** 作者: wangfei 创建时间: 2021/12/10 包名: com.nl.lib_project.provider.bus 类名: LocalEventBus */
object LocalEventBus {
  private val localEvents = MutableSharedFlow<Event>()
  val events = localEvents.asSharedFlow()

  suspend fun postEvent(event: Event) {
    localEvents.emit(event)
  }
}
